home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Atari Compendium
/
The Atari Compendium (Toad Computers) (1994).iso
/
files
/
umich
/
utils
/
filestuf.lzh
/
FILESTUF.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1990-08-22
|
3KB
|
81 lines
hirez 1 -- start the script if we're in high rez
medrez 1 -- likewise for medium rez
;
;We'll exit if the ST is in low rez, since we need 80 columns!
;
s Your ST is currently in LOW REZ. The
s example scripts are designed to use
s all 80 columns, so please switch to
s either medium or high rez and rerun
s Filestuff. Thanks!
s
s press any key to continue...
b
p 30
b
quit
;
;------------------------------
;
@ 1
s
s There are some example scripts (named EX*.CMD) included in the Filestuff
s ARC. The scripts demonstrate most of the Filestuff commands. It doesn't
s take very long to run the examples, so we'll give you a chance to run them
s now. All you need to do is make sure all the files from the ARC are in the
s root directory of your disk. Also, since the file command examples will
s write to your disk, make sure there's a little bit of free space available.
s
s (There's a 30-second pause here; press any key to continue sooner. These
s example scripts use frequent pauses so that you can read what's on the
s screen... if you get tired of waiting, just hit a key to continue.)
b
p 30 -- PAUSE here so we can read the paragraph above
s
s It's probably easiest to run these from a ramdisk, but it's not necessary.
s At any rate, even if you don't run the examples now, be sure to look over
s the scripts to see how things are done.
s
s
;Note: in the SHOW command below, I've embedded the esc-p and esc-q
;commands that turn reverse video on and off to highlight the proper
;key to press. Depending on the editor you're using to look at this
;script, you may not be able to see the ESC characters. One reason I
;recommend Flash is that its editor _will_ display control characters.
;
s If you'd like to see the examples now, press the p space bar q within
s 30 seconds. Otherwise, press any other key (or no key at all).
s
;
;Here's the real stuff. Note the Buffer commands before getting keyboard
;input and before exiting the script - it's usually a good idea to use
;Buffer in both circumstances! Anyway...
;
b BUFFER clears old keypresses before asking for input
p 30 PAUSE for up to 30 seconds
k KEYGET gets a keypress if one is ready
i /s 9 IFKEY jumps if a keypress matches
;If there's any other keypress (or none at all), we'll just quit here.
b BUFFER clears the key buffer before exiting
q QUIT ends the program
@ 9 this is a LABEL
s Ok, we'll Transfer control to our first example script. Since we
s haven't turned off the file-command Echo, the entire command line for
s the Transfer will be displayed. Then the new script will be read in
s and executed. (We'll pause briefly now so you can read this message.)
s
p 10
b
t \example.cmd -- TRANSFER control to our first example script...
s
v + -- turns on reverse video for the error message!
s ◆If you see this line, then the Transfer command failed. The most likely
s cause of this is that Filestuff couldn't find the new script. Since we
s specified "\example.cmd", Filestuff is looking in the root directory of
s the default disk (the disk from which you ran Filestuff). Move all the
s supplied .CMD files into the root directory and run Filestuff again!
s
v -
p 30
b